www.gusucode.com > 线性时频分析工具箱 - ltfat-1.0.1源码程序 > 线性时频分析工具箱 - LTFAT\timing\compute_longer.m

    %COMPUTE_LONGER  Vary the length of the transform
%
%  This script computes the running time for longer and longer
%  transforms. Use the script plot_longer to visualize the result.
%
%  All other parameters except L remain fixed. The window length for the
%  filter bank algorithm is also kept fixed.
%

% Copyright (C) 2005-2011 Peter L. Soendergaard.
% This file is part of LTFAT version 1.0.1
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
% 
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
% 
% You should have received a copy of the GNU General Public License
% along with this program.  If not, see <http://www.gnu.org/licenses/>.
a=40;
M=60; 
W=4;
nrep=20;
gl=2400;
bl=24000;

% Get test sizes. Use only test sizes from nextfastfft, as the others
% cause to large a variability.
[dummy,table]=nextfastfft(1);

system('rm longer_fb_real.log');
system('rm longer_fac_real.log');
system('rm longer_ola_real.log');


testrange=M*table(find(table<=1500));
idx=round(testrange/gl)==testrange/gl;
testrange=testrange(idx);
testrange

for ii=1:length(testrange)
  L=testrange(ii);
  
  s=sprintf('./time_dgtreal_fb %i %i %i %i %i %i >> longer_fb_real.log\n',a,M,L,W, ...
            gl,nrep);
  disp(s);
  system(s);

  s=sprintf('./time_dgtreal_fac %i %i %i %i %i >> longer_fac_real.log\n',a,M,L,W,nrep);  
  disp(s);
  system(s);

  % Extend L to multiple of bl for the OLA algorithm.
  Lola = ceil(L/bl)*bl;

  s=sprintf('./time_dgtreal_ola %i %i %i %i %i %i %i >> longer_ola_real.log\n',a,M,Lola,W,gl,bl,nrep);  
  disp(s);
  system(s);
  
end;